package org.turman.buobaobook.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.turman.buobaobook.model.pojo.EmailProperties;
import org.turman.buobaobook.service.EmailService;
import org.turman.buobaobook.utils.MailUtil;

@Service("emailService")
public class EmailServiceImpl implements EmailService {
    @Autowired
    private EmailProperties emailProperties;

    @Override
    public boolean send(String to, String subject, String content) {
        return MailUtil.sendMail(emailProperties, to, subject, content);
    }
}
